﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class mostFrequentNumber
{
    static void Main()
    {
        int[] Arr = { 4, 1, 1, 4, 2, 3, 4, 4, 1, 2, 4, 9, 3, 1, 2, 1, 1 };
        int maxFreq = 0;
        int number = 0;
        for (int element = 0; element < Arr.Length; element++) 
        {
            int freq = 0;
            for (int count = element + 1; count < Arr.Length; count++) 
            {
                if (Arr[element] == Arr[count]) 
                {
                    freq += 1;
                }
            }
            if (freq > maxFreq) 
            {
                maxFreq = freq;
                number = Arr[element];
            }
        }
        Console.WriteLine("Number {1}, freq - {0} times",(maxFreq + 1), number);
    }
}

